// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Graph;

public sealed partial class VertexInclude
{
	[JsonInclude, JsonPropertyName("boost")]
	public double Boost { get; set; }
	[JsonInclude, JsonPropertyName("term")]
	public string Term { get; set; }
}

public sealed partial class VertexIncludeDescriptor : SerializableDescriptor<VertexIncludeDescriptor>
{
	internal VertexIncludeDescriptor(Action<VertexIncludeDescriptor> configure) => configure.Invoke(this);

	public VertexIncludeDescriptor() : base()
	{
	}

	private double BoostValue { get; set; }
	private string TermValue { get; set; }

	public VertexIncludeDescriptor Boost(double boost)
	{
		BoostValue = boost;
		return Self;
	}

	public VertexIncludeDescriptor Term(string term)
	{
		TermValue = term;
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
		writer.WriteStartObject();
		writer.WritePropertyName("boost");
		writer.WriteNumberValue(BoostValue);
		writer.WritePropertyName("term");
		writer.WriteStringValue(TermValue);
		writer.WriteEndObject();
	}
}